<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="x-ua-compatible" content="ie=edge">
		<title></title>
		<meta name="description" content="Neat">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" user-scalable="no">
		<link rel="stylesheet" href="index.css">
		<script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
		<script src="https://www.jq22.com/demo/sweetalert-master-150108224250/lib/sweet-alert.js"></script>
		<link rel="stylesheet" href="https://www.jq22.com/demo/sweetalert-master-150108224250/lib/sweet-alert.css">
	</head>
	<body>

		<div class="main-group">
			<h1 style="font-size: 28px;text-align: center;">报平安登记</h1>
			<div class="form-group">
				<div class="form" id="form" style="flex-direction: column;">
					<span id="bd"></span>
					<button type="submit" class="btn submit-btn" onclick="set()" style="height: 40px;">解除绑定</button>
					解除绑定需重新绑定
				</div>
			</div>
			<div id="note">
				<ul class="items-group">

				</ul>
			</div>
			<span id="nos"></span>
			<div class="icon success animate" style="display: block;"> <span class="line tip animateSuccessTip"></span>
				<span class="line long animateSuccessLong"></span>
				<div class="placeholder"></div>
				<div class="fix"></div>
			</div>
		</div>


	</body>
</html>
<script type="text/javascript">
	localStorage.getItem("bpaName") ? document.getElementById("bd").innerHTML = `你已绑定：${localStorage.getItem("bpaName")}` :
		document.getElementById("bd").innerHTML = `你没有绑定任何账号`

	function set() {
		localStorage.removeItem("bpaName")
		swal({
			title: "成功",
			type: "success",
			text: "解除绑定成功，3s后自动返回绑定页面",
			confirmButtonText: "好的"
		});
		setTimeout(() => {
			location.href = "bpa2.html"
		},3000)
	// alert("数据: " + data + "\n状态: " + status);
	}
</script>
